1. Field of the Invention
The present invention relates to an image processing apparatus for carrying out image processes such as a horizontal-to-vertical converting operation to convert an input image represented with first directional run length codes into an image represented with second directional run length codes.
2. Description of the Prior Art
A run length coding method is widely used in various image processing apparatuses such as facsimiles to compress image data. According to the run length coding method, an original image is subjected to a raster scanning operation to obtain binary image data. The binary image data are used to make a bit map, each line of the bit map comprising black dots and white dots. The length (run length) of a series of consecutive black dots (hereinafter referred to as a "black run") and the length of a series of consecutive white dots (hereinafter referred to as a "white run"), as well as positional information of endpoints of the black and white runs are coded with run length codes.
In a simple run length coding method, each run length code comprises, for instance, eight bits. A first bit of the eight-bit code is a flag for indicating whether a run is white (0) or black (1), and the remaining bits of the code indicating the length of the run. Supposing a data comprises two consecutive white dots, three consecutive black dots and two consecutive white dots, the data will be coded as "02, 83, 02" in hexadecimal notation.
Meanwhile, horizontal and vertical run length data are frequently used to extract linear elements from an input image or to remove noises from the input image. For instance, in a handwritten character recognition apparatus, horizontal and vertical black runs are used as information to find horizontal and vertical projections.
The run length coding is generally carried out for the same direction as that of raster scan which takes place, for instance in a horizontal direction. Therefore, to obtain information of vertical components, coded horizontal run data are decoded into an original bit map (binary image data), and based on which vertical run length codes shall be prepared to obtain vertical projections, etc. Due to this, an image memory needed for the method must have a large capacity. Further, the process to obtain vertical components shall be carried out for every pixel so that the number of memory accesses and the number of computation may be increased to extend an operation time.
As described in the above, the conventional image processing apparatus requires a large memory capacity and takes a long time in carrying out an image process such as the horizontal-to-vertical converting operation to obtain run length codes for a direction different from a scanning direction.